var keys = require("./07_keys");

function isMatch(obj, attrs) {
  if (obj == null) return false;
  var keysArray = keys(attrs),
    length = keys.length;
  object = Object(obj);
  for (var i = 0; i < length; ++i) {
    var currentKey = keysArray[i];
    if (!(currentKey in object) || object[currentKey] !== attrs[currentKey]) {
      return false;
    }
  }
  return true;
}

module.exports = isMatch;
